﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OtdYieldReport.aspx.cs" Inherits="MLY.Reports.DataReports.OtdYieldReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %> 

<%@ Register Assembly="DevExpress.Web.v11.1.Linq, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel"
  TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel"
  TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxLoadingPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>



<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><asp:Literal ID="TitleLiteral" runat="server" Text="<%$ Dict:Report.OnTimeDelivery %>"></asp:Literal></title>
    <link href="/Style/General_Style_v9.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/ReportsStylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
        <asp:Label ID="ReportTitleLabel" runat="server" Text="<%$ Dict:Report.OnTimeDelivery %>" CssClass="TitleStyle floater"></asp:Label>
        <asp:Label ID="ReportTitleLabel2" runat="server" Text="<%$ Dict:Report.SuppliersYield %>" CssClass="TitleStyle floater"></asp:Label>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <Triggers>
            <asp:PostBackTrigger ControlID="ExportToXLS" />
            <asp:PostBackTrigger ControlID="ExportToXLSx" />          
        </Triggers>
        <ContentTemplate>
            <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="ReportGrid"></dx:ASPxGridViewExporter>
            <table cellpadding="5" cellspacing="0">
                <tr>
                <td>
                    <dx:ASPxButton Id="ExportToXLS" runat="server" Text="Export to XLS" UseSubmitBehavior="False"
                        OnClick="btnXlsExport_Click"   ></dx:ASPxButton>
                                      
                </td>
                <td>
                    <dx:ASPxButton Id="ExportToXLSx" runat="server" Text="Export to XLSx" UseSubmitBehavior="False"
                        OnClick="btnXlsxExport_Click"></dx:ASPxButton>
                </td>                
                </tr>
            </table> 
            <br /><br />
            <asp:Label ID="ChooseProductTitle" runat="server" Text='<%$ Dict:clientWoGrid.ProductDescription %>' CssClass="regFont"></asp:Label>
            &nbsp;&nbsp;
            <asp:DropDownList ID="ProductDDL" runat="server" AutoPostBack="true" OnSelectedIndexChanged="Refresh"></asp:DropDownList>
            <br />
            <div style="height:20px;">
            <asp:UpdateProgress ID="UpdateProgressP1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
            <ProgressTemplate>
                <img alt="progress" src="../../Images/ajax-loaderBar.gif" />                
            </ProgressTemplate>
            </asp:UpdateProgress>
            </div>
            <dx:ASPxGridView ID="ReportGrid" runat="server"  
             DataSourceID="OtdYieldDataSource"
             EnableCallBacks="False" SettingsPager-RenderMode="Lightweight"
             EnableTheming="False" 
             KeyFieldName="orgName" 
             Settings-ShowFilterRow="true" 
             Settings-ShowGroupButtons="true"
             Settings-ShowFilterBar="Hidden" Settings-ShowFilterRowMenu="True"
             Settings-ShowGroupedColumns="True" Settings-ShowGroupPanel="True" 
             Settings-UseFixedTableLayout="True" SettingsPager-PageSize="100" >
            <SettingsBehavior AllowFocusedRow="True" ColumnResizeMode="NextColumn" AutoFilterRowInputDelay="2500"  />
            <SettingsPager RenderMode="Lightweight"></SettingsPager>
            <Styles Header-Wrap="True"></Styles>
            <Columns>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:ClientsGrid.ClientName %>" FieldName="orgName"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:EditMessage.ContractorNames %>" FieldName="orgName"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:Report.OnTimeDelivery %>" FieldName="OnTimeDelivery"></dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="<%$ Dict:Report.SuppliersYield %>" FieldName="SuppliersYield"></dx:GridViewDataTextColumn>                
            </Columns>
            </dx:ASPxGridView>
            <asp:SqlDataSource ID="OtdYieldDataSource" runat="server" SelectCommandType="StoredProcedure"
                ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" SelectCommand="SCCover_GetOtdYieldFullData"></asp:SqlDataSource>   
        </ContentTemplate>
        
        </asp:UpdatePanel>
        
        
    </div>
    </form>
</body>
</html>
